"use strict";

$(function () {
    let recommend = $("#mh-recommend");
    let food = $("#mh-food");
    let live = $("#mh-live");
    let clothing = $("#mh-clothing");
    let toy = $("#mh-toy");
    let offline = $("#mh-offline");
    let other = $("#mh-other");

    let caid = $("#mh-caid")

    recommend.removeClass("active")
    food.removeClass("active")
    live.removeClass("active")
    clothing.removeClass("active")
    toy.removeClass("active")
    offline.removeClass("active")
    other.removeClass("active")

    let val = caid.val();

    switch (val) {
        case "1":
            food.addClass("active");
            $("#mh-carousel").remove()
            break;
        case "2":
            live.addClass("active");
            $("#mh-carousel").remove()
            break;
        case "3":
            clothing.addClass("active");
            $("#mh-carousel").remove()
            break;
        case "4":
            toy.addClass("active");
            $("#mh-carousel").remove()
            break;
        case "5":
            offline.addClass("active");
            $("#mh-carousel").remove()
            break;
        case "6":
            other.addClass("active");
            $("#mh-carousel").remove()
            break;
        case "0":
        default:
            recommend.addClass("active")
            break;
    }


});